﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoreBroker
{
    public class PlayingAbortEventArgs : EventArgs
    {
        public readonly string Error;
        public PlayingAbortEventArgs(string error)
        {
            Error = error;
        }
    }

    /// <summary>
    /// 检测正脸结果报告
    /// </summary>
    public class DetectFrontResultReportedEventArgs : EventArgs
    {
        public readonly RecogOut RecogRes;
        public DetectFrontResultReportedEventArgs(RecogOut res)
        {
            this.RecogRes = res;
        }
    }

    /// <summary>
    /// 检测结果报告
    /// </summary>
    public class DetectResultReportedEventArgs : EventArgs
    {
        public readonly RecogOut RecogRes;
        public TakenPhoto Photo;
        public DetectResultReportedEventArgs(TakenPhoto photo, RecogOut res)
        {
            this.RecogRes = res;
            Photo = photo;
        }
    }

    /// <summary>
    ///拍照结果报告
    /// </summary>
    public class TakingCompletedEventArgs : EventArgs
    {
        public readonly List<TakingResult> Results;
        public TakingCompletedEventArgs(List<TakingResult> results)
        {
            this.Results = results;
        }
    }

    /// <summary>
    /// 拍照准备任务完成事件
    /// </summary>
    public class ReadyTaskCompletedEventArgs : EventArgs
    {
        public readonly bool FrontDetected;
        public ReadyTaskCompletedEventArgs(bool result)
        {
            this.FrontDetected = result;
        }
    }
    
    /// <summary>
    /// 拍照准备任务中止事件
    /// </summary>
    public class ReadyTaskAbortedEventArgs : EventArgs
    {
        public readonly string AbortReason;
        public readonly int AbortCode;
        public ReadyTaskAbortedEventArgs(int code, string reason)
        {
            this.AbortCode = code;
            this.AbortReason = reason;
        }
    }

    /// <summary>
    /// 拍照任务中止事件
    /// </summary>
    public class TakingAbortedEventArgs : EventArgs
    {
        public readonly string AbortReason;
        public readonly int AbortCode;
        public TakingAbortedEventArgs(int code, string reason)
        {
            this.AbortCode = code;
            this.AbortReason = reason;
        }
    }
}
